1. Technical Field
The invention relates to a storage unit management method of a memory storage device. Particularly, the invention relates to a method for recognizing cold data for managing storage units, and a memory controller and a memory storage device using the same.
2. Related Art
A rewritable non-volatile memory has characteristics of data non-volatile, power-saving, small size and non-mechanical structure, etc., so that it is widely used in various electronic devices. Generally, the rewritable non-volatile memory has a plurality of memory blocks, and each of the memory blocks includes a plurality of pages. Memory block is the smallest unit for erasing data, and page is the smallest unit for writing data. Although the rewritable non-volatile memory has the aforementioned advantages, erase count of each of the memory blocks is limited. For example, the memory block is worn after being erased for ten thousand times, when a part of storage capacity losses or device performance is obviously degraded due to wearing of the memory blocks, it may cause loss of data stored by the user or failure in data storage.
Wearing of the memory blocks is determined by programming or erase count of each of the memory blocks. Namely, if one memory block is only programmed (or written) for once, and is not programmed again thereafter, wearing of such memory block is relatively low. Comparatively, if one memory block is repeatedly programmed and erased, wearing of such memory block is relatively high. For example, when a host that accesses the memory blocks repeatedly uses a same logical block address to write data, the memory block of the same physical address in the rewritable non-volatile memory is repeatedly written and erased.
When some memory blocks are worn and some other memory blocks are not worn, existence of the worn memory blocks may degrade performance of the rewritable non-volatile memory. Besides degradation of the worn memory block itself, the whole performance of the rewritable non-volatile memory is also degraded. Namely, when the number of the worn memory blocks of the rewritable non-volatile memory exceeds a threshold, even if there are still other unworn memory blocks, the rewritable non-volatile memory is still judged to be useless. When the unworn memory blocks are regarded as useless, it is actually a waste of resources.
In order to increase a service life of the rewritable non-volatile memory, the memory blocks therein are averagely used as far as possible. Generally, the memory blocks of the rewritable non-volatile memory are grouped into a data area and a spare area, and a conventional wear-leveling method is to exchange the memory blocks in the data area with the memory blocks in the spare area after the rewritable non-volatile memory operates for a fixed period of time, so that the memory block with less erase count in the data area is exchanged to the spare area for programming (or writing).
When the memory block with less erase count in the data area is exchanged to the spare area, the memory block with higher erase count in the spare area is generally exchanged to the data area. However, if data stored in such memory block is frequently updated data, such memory block is probably again associated to the spare area during data updating. However, when wear-leveling is executed for the next time, since the memory block again associated to the spare area has the erase count higher than other memory blocks, it has a higher chance to be exchanged to the data area compared to other memory blocks.
Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.